🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / model / src / commonMain / kotlin / org / meshtastic / core / model / MeshLog.kt
Displaying Raw • Download
core/model/src/commonMain/kotlin/org/meshtastic/core/model/MeshLog.kt 01cd54907d62cd90913d3d071b6bc240cae365ef (01cd5490) Text, 2.28 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.model
Tff7b72import T7ee787co.touchlab.kermit.Logger
Tff7b72import T7ee787org.meshtastic.core.model.util.decodeOrNull
Tff7b72import T7ee787org.meshtastic.proto.FromRadio
Tff7b72import T7ee787org.meshtastic.proto.MyNodeInfo
Tff7b72import T7ee787org.meshtastic.proto.NodeInfo
Tff7b72import T7ee787org.meshtastic.proto.Position
T8b949e/**
* Represents a log entry in shared repository/domain code.
*
* Logs are used for auditing radio traffic, telemetry history, and debugging.
*/
Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffEmptyCatchBlockTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffSwallowedExceptionTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffConstructorParameterNamingTa5d6ff"Tb4b4b4)
Tff7b72data Tff7b72class T56d364MeshLogTb4b4b4(
Tff7b72val Te6edf3uuidTb4b4b4: Tffa657StringTb4b4b4,
Tff7b72val Te6edf3message_typeTb4b4b4: Tffa657StringTb4b4b4,
Tff7b72val Te6edf3received_dateTb4b4b4: Tffa657LongTb4b4b4,
Tff7b72val Te6edf3raw_messageTb4b4b4: Tffa657StringTb4b4b4,
Tff7b72val Te6edf3fromNumTb4b4b4: Tffa657Int Tff7b72= T79c0ff0Tb4b4b4,
Tff7b72val Te6edf3portNumTb4b4b4: Tffa657Int Tff7b72= T79c0ff0Tb4b4b4,
Tff7b72val Te6edf3fromRadioTb4b4b4: Te6edf3FromRadio Tff7b72= Te6edf3FromRadioTb4b4b4(Tb4b4b4)Tb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3meshPacket Tff7b72= Te6edf3fromRadioTb4b4b4.Te6edf3packet
Tff7b72val Te6edf3nodeInfoTb4b4b4: Te6edf3NodeInfo?
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3fromRadioTb4b4b4.Te6edf3node_info
Tff7b72val Te6edf3myNodeInfoTb4b4b4: Te6edf3MyNodeInfo?
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3fromRadioTb4b4b4.Te6edf3my_info
Tff7b72val Te6edf3positionTb4b4b4: Te6edf3Position?
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72=
Te6edf3fromRadioTb4b4b4.Te6edf3packetTff7b72?.Te6edf3decodedTff7b72?.Te6edf3payloadTff7b72?.Te6edf3let Tb4b4b4{
Tff7b72if Tb4b4b4(Te6edf3fromRadioTb4b4b4.Te6edf3packetTff7b72?.Te6edf3decodedTff7b72?.Te6edf3portnum Tff7b72=Tff7b72= Te6edf3orgTb4b4b4.Te6edf3meshtasticTb4b4b4.Te6edf3protoTb4b4b4.Te6edf3PortNumTb4b4b4.Te6edf3POSITION_APPTb4b4b4) Tb4b4b4{
Te6edf3PositionTb4b4b4.Te6edf3ADAPTERTb4b4b4.Te6edf3decodeOrNullTb4b4b4(Tffa657itTb4b4b4, Te6edf3LoggerTb4b4b4)
Tb4b4b4} Tff7b72else Tb4b4b4{
Tff7b72null
Tb4b4b4}
Tb4b4b4} Tff7b72?: Te6edf3nodeInfoTff7b72?.Te6edf3position
Tff7b72companion Tff7b72object Tb4b4b4{
T8b949e/**
* The node number used to represent the local node in the logs.
*
* Using 0 instead of the actual node number ensures log continuity even if the radio hardware or local ID
* changes.
*/
Tff7b72const Tff7b72val Te6edf3NODE_NUM_LOCAL Tff7b72= T79c0ff0
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.05s